/**
 * 获取select数据
 */
export const getOptionsList = async (params) => {
    return new Promise((resolve) => {
        setTimeout(() => {
            resolve({
                code: 200,
                data: [
                    {
                        label: '选项1',
                        value: '1'
                    },
                    {
                        label: '选项2',
                        value: '2'
                    },
                    {
                        label: '选项3',
                        value: '3'
                    },
                    {
                        label: '选项4',
                        value: '4'
                    },
                    {
                        label: '选项5',
                        value: '5'
                    }]
            });
        }, 1000);
    });
}
/**
 * 获取性别数据
 */
export const getAgeList = async (params) => {
    return new Promise((resolve) => {
        setTimeout(() => {
            resolve({
                code: 200,
                data: [{
                    label: '男',
                    value: '1'
                }, {
                    label: '女',
                    value: '2'
                }]
            });
        }, 1000);
    });
}

/**
 * 获取树形数据
 */
export const getTreeList = async (params) => {
    return new Promise((resolve) => {
        setTimeout(() => {
            resolve({
                code: 200,
                data: [
                    {
                        label: '植物界',
                        value: 'plantae',
                        children: [
                            {
                                label: '被子植物',
                                value: 'angiosperms',
                                children: [
                                    {
                                        label: '单子叶植物',
                                        value: 'monocots'
                                    },
                                    {
                                        label: '双子叶植物',
                                        value: 'dicots'
                                    }
                                ]
                            },
                            {
                                label: '裸子植物',
                                value: 'gymnosperms',
                                children: [
                                    {
                                        label: '松科',
                                        value: 'pinaceae'
                                    },
                                    {
                                        label: '柏科',
                                        value: 'cupressaceae'
                                    }
                                ]
                            },
                            {
                                label: '蕨类植物',
                                value: 'ferns',
                                children: [
                                    {
                                        label: '水龙骨科',
                                        value: 'polypodiaceae'
                                    },
                                    {
                                        label: '蹄盖蕨科',
                                        value: 'dryopteridaceae'
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        label: '动物界',
                        value: 'animalia',
                        children: [
                            {
                                label: '哺乳动物',
                                value: 'mammals',
                                children: [
                                    {
                                        label: '食肉目',
                                        value: 'carnivores'
                                    },
                                    {
                                        label: '偶蹄目',
                                        value: 'artiodactyla'
                                    }
                                ]
                            },
                            {
                                label: '鸟类',
                                value: 'birds',
                                children: [
                                    {
                                        label: '猛禽',
                                        value: 'raptors'
                                    },
                                    {
                                        label: '鸣禽',
                                        value: 'oscine'
                                    }
                                ]
                            },
                            {
                                label: '爬行动物',
                                value: 'reptiles',
                                children: [
                                    {
                                        label: '蜥蜴',
                                        value: 'lizards'
                                    },
                                    {
                                        label: '蛇',
                                        value: 'snakes'
                                    }
                                ]
                            }
                        ]
                    }
                ]
            });
        }, 1000);
    });
}
